{% extends 'evaluate/admin/adminBase.html' %}
{%block right_views%}
<div class="">
            <div class="page-title">
              <div class="title_left">
                <h3>数据分析</h3>
              </div>

              <div class="title_right">
                <div class="col-md-5 col-sm-5 col-xs-12 form-group pull-right top_search">
                 
                </div>
              </div>
            </div>
            <div class="clearfix"></div>
            <div class="row">
              <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                  <div class="x_title">
                    <h2>启动学期评价</h2>
                    <div class="clearfix"></div>
                  </div>
                  <div class="x_content">
                  {% if year.state == 'active' %}
                    <form class="form-horizontal form-label-left" action="{% url 'c_admin_pwd' %}"  method="post" novalidate>
                      <span class="section"></span>
                      <div class="item form-group">
                        <div class="col-md-6 col-sm-6 col-xs-12">
                         <p>系统开放中</p>
                         <label class="control-label " >当前学年:<span>{{year.year_term}}</span>
                        </label>
                        </div>
                      </div>    
                      <div class="ln_solid"></div>
                      <span>请先结束评价功能</span>
                      <div class="">
                        <div class="col-md-6 col-md-offset-3">
                          <a href="javascript:;"  class="btn btn-success countEva" >结束,并分析数据</a>
                        </div>
                      </div>
                    </form>
                    {% elif year.state == 'close' %}
                    <form class="form-horizontal form-label-left" action="{% url 'c_admin_pwd' %}"  method="post" novalidate>
                      <span class="section"></span>
                      <div class="item form-group">
                        <div class="col-md-6 col-sm-6 col-xs-12">
                         <p>系统已完成当学期评价采集</p>
                         <label class="control-label " >当前学年:<span>{{year.year_term}}</span>
                        </label>
                        </div>
                      </div>    
                      <div class="ln_solid"></div>
                      <div class="">
                        <div class="col-md-6 col-md-offset-3">
                          <a href="javascript:;"  class="btn btn-success countEva" >启动离线分析</a>
                        </div>
                      </div>
                    </form>
                    {% else %}
                    <form class="form-horizontal form-label-left" action="{% url 'c_admin_pwd' %}"  method="post" novalidate>
                      <span class="section"></span>
                      <div class="item form-group">
                        <div class="col-md-6 col-sm-6 col-xs-12">
                         {% if year_lately == 'false' %}
                         <p>系统首次运行，如需，请先在设置中开启新学期评价数据采集</p>
                         <label class="control-label " >最近完成学年:<span>无</span>
                          {%else%}
                          <p>下一阶段评价功能未开放，如需，请在设置中开启新学期评价数据采集</p>
                           <label class="control-label " >最近完成学年:
                          <span>{{year_lately.year_term}}</span>
                          {% endif %}
                        </label>
                        </div>
                      </div>    
                      <div class="ln_solid"></div>
                      
                    </form>
                    {% endif %}
                  </div>
                </div>
              </div>
            </div>
          </div>
    <!--开启离线计算模态框-->
    <div class="modal fade" id="startE" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
      <div class="modal-dialog" style="width:1000px">
        <div class="modal-content">
          <div class="modal-header">
              <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title" id="myModalLabel"></h4>
          </div>
          <div class="modal-body" id="count-box">
              <span id='count-message'>分析中...</span>
              <i class="fa fa-cog fa-spin fa-3x fa-fw"></i>
              <span class="sr-only">Loading...</span>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-primary" data-dismiss="modal">关闭</button>
          </div>
        </div><!-- /.modal-content -->
      </div><!-- /.modal-dialog -->
    </div>
{%endblock%}
{%block js%}
<script src="/static/evaluate/js/admin/countEvaluation.js"></script>
{%endblock%}